This program is a simple file editor that uses Zinc Application Framework to present file information to the screen. In addition to the Zinc class objects, a directory and file object are defined. These objects provide file informati
This field contains the size of the file.
Create Date:
This field contains the creation date of the file.
Create Time:
This field contains the creation time of the file.
Close:
This button allows the user to close the
If the process is successful the file selection window is then removed from the screen.
Cancel:
Selecting the Cancel button causes the file selection window to be removed without any further processing by the file editor.
Selection:
This field contains the name of the file you wish to open, save or retrieve information about. Enter the name of the desired file then press <Enter> or select the OK button.
Cancel:
moving to the field and pressing <Enter>.
Selecting the OK button causes the information in the filename field to be processed by the file editor. If the process is successful the file selection window is then removed from the screen.
Cancel:
DRIVE_ERROR1
FILE_STATISTICS@
HELP_CONTEXTSD
FILE_ERROR6
FILE_EDITOR
DIRECTORY_SERVICE_MTF!
DIRECTORY_SERVICE_OS2&
DIRECTORY_SERVICE_TXT,
DIRECTORY_SERVICE
ILES = 0x00D0;7
const USHORT SYSTEM_OK_BUTTON = 0x0012;7
const USHORT SYSTEM_CANCEL_BUTTON = 0x0013;7
const USHORT SYSTEM_HELP_BUTTON = 0x0014;7
const USHORT FIELD_330 = 0x014A;
const USHORT FILE_PROMPT = 0x0001;7
const USHORT FILE_STRING = 0x0002;7
const USHORT DIRECTORY_PROMPT = 0x0003;7
const USHORT FILE_LIST = 0x0005;7
const USHORT DIRECTORY_LIST = 0x0007;7
const USHORT FILTER_PROMPT = 0x000D;7
const USHORT FILTER_LIST = 0x000B;7
const USHORT FIELD_12 = 0x000C;7
const USHORT FILTER_ALL_FILES = 0x00CD;7
const USHORT FILTER_CPP_FILES = 0x00CE;7
const USHORT FILTER_C_FILES = 0x01B9;7
const USHORT FILTER_HPP_FILES = 0x00CF;7
const USHORT FILTER_H_FILES = 0x01BA;7
const USHORT FILTER_TXT_F
DIRECTORY_SERVICE_MTF"
DIRECTORY_SERVICE_OS2'
DIRECTORY_SERVICE_TXT-
DIRECTORY_SERVICE2
FILE_STATISTICS7
FILE_EDITOR<
DRIVE_ERRORE
FILE_ERROR
OBJECTID
USER_FUNCTION
COMPARE_FUNCTION
FilenameCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
g=X,=
DirectoryCompare
ILES = 0x00D0;7
const USHORT DRIVE_PROMPT = 0x000E;7
const USHORT DRIVE_LIST = 0x000F;7
const USHORT FIELD_16 = 0x0010;7
const USHORT SYSTEM_OK_BUTTON = 0x0012;7
const USHORT SYSTEM_CANCEL_BUTTON = 0x0013;7
const USHORT SYSTEM_HELP_BUTTON = 0x0014;7
const USHORT FILENAME_PROMPT = 0x01BF;
const USHORT FILE_PROMPT = 0x0001;7
const USHORT FILE_STRING = 0x0002;7
const USHORT DIRECTORY_PROMPT = 0x0003;7
const USHORT FILE_LIST = 0x0005;7
const USHORT DIRECTORY_LIST = 0x0007;7
const USHORT FILTER_PROMPT = 0x000D;7
const USHORT FILTER_LIST = 0x000B;7
const USHORT FIELD_12 = 0x000C;7
const USHORT FILTER_ALL_FILES = 0x00CD;7
const USHORT FILTER_CPP_FILES = 0x00CE;7
const USHORT FILTER_C_FILES = 0x0215;7
const USHORT FILTER_HPP_FILES = 0x00CF;7
const USHORT FILTER_H_FILES = 0x0216;7
const USHORT FILTER_TXT_F"
OBJECTID$
USER_FUNCTION%
COMPARE_FUNCTION
FilenameCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
DirectoryCompare
= 0x000E;7
const USHORT DRIVE_LIST = 0x000F;7
const USHORT FIELD_16 = 0x0010;7
const USHORT SYSTEM_OK_BUTTON = 0x0012;7
const USHORT SYSTEM_CANCEL_BUTTON = 0x0013;7
const USHORT SYSTEM_HELP_BUTTON = 0x0014;
const USHORT FILE_PROMPT = 0x0001;7
const USHORT FILE_STRING = 0x0002;7
const USHORT DIRECTORY_PROMPT = 0x0003;7
const USHORT DIRECTORY_STRING = 0x0004;7
const USHORT FILE_LIST = 0x0005;7
const USHORT DIRECTORY_LIST = 0x0007;7
const USHORT FILTER_PROMPT = 0x000D;7
const USHORT FILTER_LIST = 0x000B;7
const USHORT FIELD_12 = 0x000C;7
const USHORT FILTER_QSC_FILES = 0x00CD;7
const USHORT FILTER_TXT_FILES = 0x00D0;7
const USHORT FILTER_ALL_FILES = 0x02F5;7
const USHORT FILTER_HISTORY_FILES = 0x0300;7
const USHORT DRIVE_PROMPT'
OBJECTID)
USER_FUNCTION*
COMPARE_FUNCTION
FilenameCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
DirectoryCompare
= 0x0005;7
const USHORT DIRECTORY_LIST = 0x0007;7
const USHORT FILTER_PROMPT = 0x000D;7
const USHORT FILTER_LIST = 0x000B;7
const USHORT FIELD_12 = 0x000C;7
const USHORT FILTER_QSC_FILES = 0x00CE;7
const USHORT FILTER_HIS_FILES = 0x0264;7
const USHORT FILTER_ALL_FILES = 0x00CD;7
const USHORT FILTER_TXT_FILES = 0x00D0;7
const USHORT DRIVE_PROMPT = 0x000E;7
const USHORT DRIVE_LIST = 0x000F;7
const USHORT FIELD_16 = 0x0010;7
const USHORT SYSTEM_OK_BUTTON = 0x0012;7
const USHORT SYSTEM_CANCEL_BUTTON = 0x0013;7
const USHORT SYSTEM_HELP_BUTTON = 0x0014;
const USHORT FILE_PROMPT = 0x0001;7
const USHORT FILE_STRING = 0x0002;7
const USHORT DIRECTORY_PROMPT = 0x0003;7
const USHORT DIRECTORY_STRING = 0x0004;7
const USHORT FILE_LIST -
OBJECTID/
USER_FUNCTION0
COMPARE_FUNCTION
FilenameCallback
FilterCallback
FilterCallback
FilterCallback
FilterCallback
DirectoryCompare
const USHORT NAME_PROMPT = 0x0001;7
const USHORT NAME_FIELD = 0x0002;7
const USHORT SIZE_PROMPT = 0x0003;7
const USHORT SIZE_FIELD = 0x0004;7
const USHORT DATE_PROMPT = 0x0005;7
const USHORT DATE_FIELD = 0x0006;7
const USHORT TIME_PROMPT = 0x0007;7
const USHORT TIME_FIELD = 0x0008;7
const USHORT FIELD_14 = 0x000E;7
const USHORT FIELD_15 = 0x000F;
OBJECTID4
USER_FUNCTION5
COMPARE_FUNCTION
= 0x00EE;7
const USHORT FIELD_240 = 0x00F0;7
const USHORT OPTION_HELP_COMMANDS = 0x0147;7
const USHORT OPTION_HELP_ABOUT = 0x00EF;7
const USHORT TEXT_FIELD = 0x0001;
const USHORT MENU_FIELD = 0x0016;7
const USHORT OPTION_FILE = 0x0017;7
const USHORT FIELD_237 = 0x00ED;7
const USHORT OPTION_FILE_NEW = 0x002D;7
const USHORT OPTION_FILE_OPEN = 0x002E;7
const USHORT OPTION_FILE_SAVE = 0x0044;7
const USHORT OPTION_FILE_SAVE_AS = 0x0045;7
const USHORT OPTION_FILE_SEPARATOR1 = 0x0046;7
const USHORT OPTION_FILE_DELETE = 0x00477
OBJECTID9
USER_FUNCTION:
COMPARE_FUNCTION
const USHORT ERROR_STRING = 0x0001;7
const USHORT ERROR_RETRY_FIELD = 0x0002;7
const USHORT ICON_FIELD = 0x0004;7
const USHORT ERROR_CANCEL_FIELD = 0x0005;
OBJECTID>
USER_FUNCTION?
COMPARE_FUNCTION
const UI_HELP_CONTEXT HELP_FILE_EDITOR = 0x0001; // Help File Editor^
const UI_HELP_CONTEXT HELP_FILE_ABOUT = 0x0007; // Help, About File Editor...U
const USHORT OPTION_HELP the current operating system. A valid filename must be provided for the delete command to be successful.
File, Statistics...
This command allows the user to select a file and to view the statistical information associated with the file. A valid fi4; // Help File SelectionW
const UI_HELP_CONTEXT HELP_DIRECTORY_SERVICE_OS2 = 0x0005; // Help File Selection
tected.
FILE_ERROR
File Error
ERROR_OK_BUTTON
FILE_ICON_FIELD
EXCLAMATION
ERROR_TEXT
A file error has been de7
const USHORT ERROR_OK_BUTTON = 0x0002;7
const USHORT FILE_ICON_FIELD = 0x0004;7
const USHORT ERROR_TEXT = 0x0010;
OBJECTIDG
USER_FUNCTIONH
COMPARE_FUNCTION
on and statistics to the user as well as providing browse capabilities for system directories.
This program shows how to construct two objects that can communicate with one another during the operation of the program.
(801) 785-8997
FAX: (801) 785-8996
Zinc Software (UK) Limited
58-60 Beresford Street
London, SE18 6BG UNITED KINGDOM
Telephone: +44 (0)81 855 9918
Zinc BBS: +44 (0)81 317 2310
FAX: +44 (0)81 316 7776
Help, Commands...|
This help screen contains information about the command options available to the file editor. They are presented in the same order as that presented in the File menu.
File, New
This command causes the contents of the file editor's text field to be discarded and for the filename and text field to be cleared.
File, Open...
This command allows the user to select a file to be opened from the file selection window. A valid filename must be provided for the open to be successful. In addition, only those files whose length is less than 30,000 bytes can be opened by this application.
File, Save
This command causes the contents of the file editor's text field to be saved to the current file.
File, Save As...
This command allows the user to select a filename and path where the file editor contents may be saved. A valid filename must be provided for the save-as command to be successful.
File, Delete...
This command allows the user to select a file do be deleted from
Help File Statistics
The file statistics window contains information about the user specified file. The following information is presented:
Filename:
This field contains the name of the file whose statistical information is being viewed.
Size:
Help File Selection
The file selection window allows users to browse drives and directories for a file that will be opened, saved or whose information will be viewed. The following fields are available in the window:
Filename:
This field contains the name of the file you wish to open, save or retrieve information about. Enter the name of the desired file then press <Enter> or select the OK button.
Directories:
This field contains the directories that may be browsed. A directory can be selected from the list by moving to the field and pressing <Enter>.
List Files of Type:
This field contains filters (or wild-card match information) for the type of files you want to see in the file list. The patterns in this field can be selected by pressing on the list's down arrow, moving to the desired filter, then pressing <Enter>.
Drives:
This field contains the active drives on the system. The drives in this field can be selected by pressing on the list's down arrow, moving to the desired drive, then pressing <Enter>. If the drive is available the directory and file fields are updated. Otherwise an error message is presented.
Selecting the OK button causes the information in the filename field to be processed by the file editor.
Help File Selection
The file selection window allows users to browse drives and directories for a file that will be opened, saved or whose information will be viewed. The following fields are available in the window:
Filter:
This field contains filters (or wild-card match information) for the type of files you want to see in the file list. The patterns in this field can be selected by pressing on the list's down arrow, moving to the desired filter, then pressing <Enter>.
Directories:
Files:
Help File Selectionn
The file selection window allows users to browse drives and directories for a file that will be opened, saved or whose information will be viewed. The following fields are available in the window:
Filename:
This field contains the name of the file you wish to open, save or retrieve information about. Enter the name of the desired file then press <Enter> or select the OK button.
Type:
This field contains filters (or wild-card match information) for the type of files you want to see in the file list. The patterns in this field can be selected by pressing on the list's down arrow, moving to the desired filter, then pressing <Enter>.
Drive:
This field contains the active drives on the system. The drives in this field can be selected by pressing on the list's down arrow, moving to the desired drive, then pressing <Enter>. If the drive is available the directory and file fields are updated. Otherwise an error message is presented.
File:
This field contains the files that may be selected from the current directory. A file can be selected from the list by moving to the field and pressing <Enter>.
Directory:
This field contains the directories that may be browsed. A directory can be selected from the list by lename must be provided or the statistics command to be successful.
File, Exit
This command exits the user from the file edit application.
Selecting the Cancel button causes the file selection window to be removed without any further processing by the file editor.